import re


def get_String(string):
    res = re.match(r'\w{4,6}$', string)
    if res:
        return res.group()


while 1:
    name = input("请输入姓名：")
    res = get_String(name)
    print(res)
